package web.controller;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import service.IBookService;
import service.impl.BookServiceImpl;
import entity.Book;

public class BookModifyServlet extends HttpServlet {

	
	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		
		String bookid=request.getParameter("bookid");
    	IBookService service=new BookServiceImpl();
	    Book book =service.findByBookid(bookid);
	    request.setAttribute("book", book);
	    request.getRequestDispatcher("/BookModify.jsp").forward(request, response);
	}


	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {

	     doGet(request, response);
	}

	
}
